
public class mazzo {
	
	private carta[] deck = new carta[52];
	
	public mazzo(){
		int i,j,v;
		
		for (i=0,j=1,v=0; i<52; i++, j++) {
	        if (j==14){
	        	j=1;
	        	v++;}	        
			  deck[i]= new carta(v,j);		
		}
	}
	
	public void mostraMazzo(){
		int i;
		for (i=0; i<deck.length;i++) {
			System.out.println(deck[i].printValore() + " di " + deck[i].printSeme());
		}	
	}
	
	public void mischiaMazzo(){
		for (int i=51; i>0; i--){
			int rand = (int)(Math.random()*(i+1));
			carta temp = deck[i];
			deck[i] = deck[rand];
			deck[rand] = temp;
		}
		
	}


}
